---
title: Search
sitemap: false
---

<p>
  <span id="search-process">正在载入</span><span id="search-query-container" style="display: none;"> "<strong id="search-query"></strong>" 的搜索结果</span>
</p>
<ul id="search-results"></ul>

<script>
  window.data = {
    {% for post in site.posts %}
      {% if post.title %}
        {% unless post.excluded_in_search %}
          {% if added %},{% endif %}
          {% assign added = false %}
          "{{ post.url | slugify }}": 
          {
            "id": "{{ post.url | slugify }}",
            "title": "{{ post.title | xml_escape }}",
            "categories": "{{ post.categories | join: ", " | xml_escape }}",
            "url": " {{ post.url | xml_escape }}",
            "content": {{ post.content | strip_html | replace_regex: "[\s/\n]+"," " | strip | jsonify }}
          }
          {% assign added = true %}
        {% endunless %}
      {% endif %}
    {% endfor %}
  };
  console.log("window.data");
  console.log(window.data);
</script>
<script src="{{ site.url }}/js/lunr.min.js"></script>
<script src="{{ site.url }}/js/search.js"></script>